﻿using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using Equation.Enterprise.Framework.ApplicationServices;

namespace ENail.Domain.Core.Contract.Services
{
    public interface IEmployeeService : IApplicationService
    {
        /// <summary>
        /// Helps view all employees on list view
        /// </summary>
        /// <returns>List of all employees</returns>
        IList<Employee> GetAllEmployees();

        /// <summary>
        /// Helps view employees for search view
        /// </summary>
        /// <param name="where">Lambda condition to get employees</param>
        /// <returns></returns>
        IList<Employee> GetEmployees(Expression<Func<Employee, bool>> where);
        
        /// <summary>
        /// Helps view active employees only
        /// </summary>
        /// <returns>All active employees</returns>
        IList<Employee> GetAllActiveEmployees();
        
        /// <summary>
        /// Helps view details of an employee
        /// </summary>
        /// <param name="id">Identity of employee</param>
        /// <returns>Employee with specified identity</returns>
        Employee GetEmployee(int id);

        /// <summary>
        /// Insert an employee from view
        /// </summary>
        /// <param name="employee">Employee to be inserted</param>
        /// <returns>Number of records affected</returns>
        int InsertEmployee(Employee employee);

        /// <summary>
        /// Update an employee from view
        /// </summary>
        /// <param name="employee">Employee to be updated</param>
        /// <returns>Number of records affected</returns>
        int UpdateEmployee(Employee employee);

        /// <summary>
        /// Helps to inactive an employee
        /// </summary>
        /// <param name="employee">Employee to be inactive</param>
        /// <returns>Number of records affected</returns>
        int InActiveEmployee(Employee employee);
    }
}
